package com.zmj.sy.mom.srv.aps.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmj.sy.mom.srv.aps.bean.entity.order.ApsBatch;
import com.zmj.sy.mom.srv.aps.bean.entity.order.ApsWorkDetail;
import com.zmj.sy.mom.srv.aps.bean.entity.workQueue.NoPlateWorkQueueTaskDetail;
import com.zmj.sy.mom.srv.aps.bean.entity.workQueue.PlateWorkQueueTaskDetail;
import com.zmj.sy.mom.srv.aps.bean.entity.workQueue.WorkqueueDetail;
import com.zmj.sy.mom.srv.aps.bean.entity.workQueue.WorkqueueNetDetail;
import com.zmj.sy.mom.srv.aps.bean.vo.apsworkdetail.AssemPartsCountsResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.apsworkdetail.AssemWorkDetailResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.apsworkdetail.MesWorkDetailCountReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.apsworkdetail.MesWorkDetailReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.workQueue.WorkQueueGanttChartResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.workQueue.WorkQueueTaskDetailResVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface WorkQueueMapper extends BaseMapper<ApsBatch> {
    /**
     * @Description: 获取钢板加工列表信息
     *
     * @author: hejiahui
     * @since: 2024/9/20 9:55
     */
    Page<PlateWorkQueueTaskDetail> getPlateWorkQueueDetail(Page<Object> page, @Param(Constants.WRAPPER) QueryWrapper<?> infoQuery);

    Page<NoPlateWorkQueueTaskDetail> getSmartWeldingAreaDetail(Page<Object> page, @Param(Constants.WRAPPER) QueryWrapper<?> infoQuery);
    /**
     * @Description: 获取非钢板加工列表信息
     *
     * @author: hejiahui
     * @since: 2024/9/20 16:06
     */
    Page<NoPlateWorkQueueTaskDetail> getNoPlateWorkQueueDetail(Page<Object> page, @Param(Constants.WRAPPER) QueryWrapper<?> infoQuery);

    List<WorkQueueGanttChartResVo> getPlateWorkQueueRate(@Param(Constants.WRAPPER) QueryWrapper<?> infoQuery);
    /**
     * @Description: 获取套料信息
     *
     * @author: hejiahui
     * @since: 2024/9/27 10:21
     */
    List<Map<String, Object>> getNestInfo( @Param(Constants.WRAPPER) QueryWrapper<?> nestedQuery);
    List<WorkqueueNetDetail> getNestInfoCount(@Param("awdIds") List<Integer> awdIds);
    /**
     * @Description: 获取钢板查询详情
     *
     * @author: hejiahui
     * @since: 2024/11/1 15:03
     */
    List<WorkqueueDetail> getDeatailList(@Param(Constants.WRAPPER) QueryWrapper<?> nestedQuery);
    /**
     * @Description: 获取工作组工位信息
     *
     * @author: hejiahui
     * @since: 2024/11/3 13:53
     */
    List<Map<String, Object>> getStaGro(@Param(Constants.WRAPPER)QueryWrapper<?> staGroWrap);
    /**
     * @Description: 获取版本号
     *
     * @author: hejiahui
     * @since: 2024/11/16 10:56
     */
    List<Map<String, Object>> getVersionList(@Param(Constants.WRAPPER)QueryWrapper<?> staGroWrap);


  List<AssemWorkDetailResVo> dateMesWorkDetail(@Param("partAlisName") List<String> partAlisName,@Param("constructNos") List<String>   constructNos,@Param("plmid") String plmid, @Param("phaseCodes")List<String>   phaseCodes);

    List<AssemWorkDetailResVo> workDetailPlane(@Param("startTime")String startTime, @Param("endTime") String endTime);

    List<AssemWorkDetailResVo> curleWorkDetail(@Param("constructNo") String constructNo, @Param("endTime") String endTime);

    AssemWorkDetailResVo getDetailCount(@Param("reqVo") MesWorkDetailCountReqVo reqVo);
}
